package com.hwpt.hwaccount.feature.home;

import android.content.Context;

import com.hwpt.hwaccount.core.base.BaseContract;
import com.hwpt.hwaccount.core.data.local.entity.UserEntity;

public interface HomeContract {

    interface View extends BaseContract.View {
        Context getContext();
        void showUserInfo(UserEntity user);
        void navigateToPersonalInfo();
        void navigateToAccountSecurity();
        void navigateToFeedback();
        void navigateToAbout();
        void logoutSuccess();
    }

    interface Presenter extends BaseContract.Presenter<View> {
        void loadUserInfo();
        void onPersonalInfoClicked();
        void onAccountSecurityClicked();
        void onFeedbackClicked();
        void onAboutClicked();
        void onLogoutClicked();
    }

    interface Model extends BaseContract.Model {
        void loadUserInfo(LoadUserCallback callback);
        void logout(LogoutCallback callback, Context context);

        interface LoadUserCallback {
            void onSuccess(UserEntity user);
            void onError(String message);
        }

        interface LogoutCallback {
            void onSuccess();
            void onError(String message);
        }
    }
}